package cn.wolfcode.edu.mapper;

import cn.wolfcode.edu.domain.Department;
import cn.wolfcode.edu.domain.Role;
import cn.wolfcode.edu.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role entity);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role entity);
    int queryForCount(QueryObject qo);
    List<Role> queryForList(QueryObject qo);
    List<Long> listIdsByEmployeeId(Long id);

    List<String> getAllSns();
    List<String> getSnsByEmployeeId(Long id);
    void insertRelationWithPermission(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    void deleteRelationWithPermissionByRoleId(Long id);
}